![]() |
PATH![]() |
![]() ![]() |
A container is an object that contains one or more objects or properties. In a reference, the container specifies where to find an object or a property. To specify a container, use the word of or in , as in the following statement
folder "Utilities" of disk "Hard Disk:"
A container can be an object or a series of objects. In a series, the smallest object is listed first, followed by the larger objects that contain it. Use the word of or in to separate each object from its larger, containing object. In the following example, the body of text is contained in a larger document object, paragraph three is contained in the larger text object, and word four in the larger paragraph object.
tell application "AppleWorks"
word 4 in paragraph 3 of text body of front document
end tell
You can also use the possessive form ( 's ) to specify containers. If you use the possessive form, list the container before the object it contains. In the following example, the container is first window. The object it contains is a Name property.
tell application "AppleWorks"
first window's name
end tell
All properties and elements have containers. The previous example specified the Name property of a window, which is contained in a window object. Similarly, the following example specifies the Style property, which is contained in a text object.
tell application "AppleWorks"
style of text body of front document
end tell